//
//  WBDemoController.swift
//  WeiBo
//
//  Created by 安中 on 2020/5/2.
//  Copyright © 2020 az. All rights reserved.
//

import UIKit

class WBDemoController: WBBaseController {

    override func viewDidLoad() {
        super.viewDidLoad()
        title = "第\(navigationController?.children.count ?? 0)个"
    }
    
    @objc private func showNext() {
        let vc = WBDemoController()
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBDemoController {
    //重写父类方法
    override func setupUI() {
        super.setupUI()
        
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
}
